package com.org.javabody.StaticApi.StaticDemo;

/**
 * Created by Administrator on 2017-03-30.
 */
public class StaticTest {
    public static int value = -1;//共享变量
    public void addValue(){
        value++;
        System.out.println(value);
    }
    public void subValue(){
        value--;
        System.out.println(value);
    }
    public static void main(String[] args) {
        System.out.println(value);
        new StaticTest().addValue();
        new StaticTest().addValue();
        new StaticTest().addValue();
        new StaticTest().addValue();
        new StaticTest().addValue();
        new StaticTest().subValue();

    }
}
